/*
package com.shawn.mysql;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.shawn.dubbo.DubboServerApplication;
import com.shawn.dubbo.mapper.OptionsMapper;
import com.shawn.dubbo.mapper.UserMapper;
import com.shawn.model.entity.Options;
import com.shawn.model.entity.User;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.List;
import java.util.stream.Collectors;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = {DubboServerApplication.class})
public class ListRegister {


//    @Autowired
//    private EMTemplate emTemplate;
//
    @Autowired
    private OptionsMapper optionsMapper;
//
    @Test
    public void listRegister(){
        LambdaQueryWrapper<Options> wrapper = new LambdaQueryWrapper<>();
        List<Options> options = optionsMapper.selectList(wrapper);
       options= options.stream().peek((option)-> {
           option.setSqId(option.getSqId() + 10);
           option.setId(null);
       }).collect(Collectors.toList());
        for (Options option : options) {
                optionsMapper.insert(option);
        }
    }
}
*/
